﻿using System;
using Microsoft.Xna.Framework;
using WindowsGame.Input;

namespace WindowsGame.Manager
{
	public interface IInputManager
	{
		void Update(GameTime gameTime);
		Boolean Escape();
		Boolean Toggle();
		Boolean Load();
	}

	public class InputManager : IInputManager
	{
		private readonly IInputFactory inputFactory;

		public InputManager(IInputFactory inputFactory)
		{
			this.inputFactory = inputFactory;
		}

		public void Update(GameTime gameTime)
		{
			inputFactory.Update(gameTime);
		}
		public Boolean Escape()
		{
			return inputFactory.Escape();
		}
		public Boolean Toggle()
		{
			return inputFactory.Toggle();
		}
		public Boolean Load()
		{
			return inputFactory.Load();
		}
	}
}
